@extends('layouts.app')
@section('title','类目管理')
@section('content')


<!-- start: Content -->
<div class="row-fluid">		
	<div class="box span12">
		<div class="box-header" data-original-title="">
			<h2><span class="break"></span>首页类目管理</h2>
		</div>
		<div class="box-content">
			<table class="table table-striped" >
				<thead>
					<tr>
				  		<th style='width:10%;'>
							<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#leimu">
							  添加类目
							</button>
				  		</th>
				  	</tr>
				  </thead>
			</table>
			<table class="table"> 

			<tbody>
				@foreach($leimu as $sv)
					<tr>
						<td class="center" >
							<a class="btn role="button" data-toggle="collapse" href="#{{ $sv->id }}" aria-expanded="false" aria-controls="collapseExample">
								 {{ $sv->classname }}
							</a>
							<div class="collapse" id="{{ $sv->id }}">
								  <div class="well">
								  	@foreach($leimums as $lv)
								  		@if($lv->cid == $sv->id)
										  	@foreach($serve as $av)
										  		@if($av->id == $lv->serve_a)
										  			<div style='width:200px;float:left;'>
														<div style='float:left;margin-right: 15px;float:left;'>
															<span style='float:left;font-weight:bold;'>{{ $av->title }}</span><br>
															原价：{{ $av->price }}元&nbsp;&nbsp;现价：{{ $av->is_price }}元
														</div>
														
													</div>
													
												@endif
											@endforeach
										@endif
								  	@endforeach	
								  </div>
							</div>
						</td>
						<td class="center">
							<a class="btn btn-danger" href='{{ URL("app/leimu/{$sv->id}/edit") }}'>
								删除
							</a>
						</td>
					</tr>
				@endforeach
			  </tbody>
		  </table>
		</div>
	</div><!--/span-->

</div><!--/row-->
<!-- end: Content -->
@include('staticpages.leimu.add')
@stop